package gewu.suleju.dao.iml;

import gewu.suleju.model.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface IBrokerLandlordDao extends JpaRepository<User,Integer> {
    //正在服务的房东
    @Query(value="select * from user where id in (select house_infor_id from broker_agent_house where is_status=0 and broker_info_id=?1)",nativeQuery = true)
    List<User> findUserLandlordIng(Integer brokerid);
    //结束服务的房东
    @Query(value="select * from user where id in (select house_infor_id from broker_agent_house where is_status=1 and broker_info_id=?1)",nativeQuery = true)
    List<User> findUserLandlordEnd(Integer brokerid);

}
